cmake_minimum_required(VERSION 2.8)

project(epollserver)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")

if(CMAKE_BUILD_TYPE MATCHES Debug)  
    target_compile_options(YourTargetName PRIVATE -g)  
endif()

add_executable(server server.cc)
add_executable(client client.cc)
target_link_libraries(server PUBLIC jsoncpp)
target_link_libraries(client PUBLIC jsoncpp)